<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<%
	String path = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getServletContext().getContextPath() + "/";
%>
<head>
<base href="<%=path%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>视频列表</title>
<style>
.jumbotron {
	width: 80%;
	margin: auto;
	margin-top: -60px;
	border-radius: 5px;
}

.jumbotron h3 {
	margin-left: 50px;
	margin-top: 20px;
}

#div1 {
	width: 85%;
	margin: auto;
}

#b1 {
	margin-left: 200px;
}

#div4 {
	width: 85%;
	margin: auto;
	margin-top: 20px;
}

#div5 {
	width: 85%;
	margin: auto;
	text-align: right;
}
</style>
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	crossorigin="anonymous">
</head>
<nav class="navbar navbar-inverse">
	<div class="container-fluid">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
				aria-expanded="false">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="#">视频管理系统</a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li><a href="video/video_list.do">视频管理 <span class="sr-only">(current)</span>
				</a></li>
				<li><a href="speaker/speaker_list.do">主讲人管理</a></li>
				<li><a href="course/course_list.do">课程管理</a></li>
				<li><a href="tjfx/tjfx2.do">课程分析</a></li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li><a href="admin/loginOut.do">admin 
				<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span>
				</a></li>
			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid --> </nav>
<div class="jumbotron">
	<h3>主讲人列表 - 主讲人管理</h3>
</div>
<div id="div1">
	<a href="speaker/speaker_insert.do"><button type="submit" class="btn btn-primary">添加主讲人</button></a>
	<form class="navbar-form navbar-right" action="speaker/speaker_list.do" method="post">
		<div class="form-group">
			名称 <input type="text" class="form-control" placeholder="主讲人名称" name="speaker_name">
			职位 <input type="text" class="form-control" placeholder="主讲人职位" name="speaker_job">
		</div>
		<button type="submit" class="btn btn-primary">查询</button>
	</form>
</div>


<div id="div4">
	<table class="table">
		<tr>
			<th width="6%">序号</th>
			<th>名称</th>
			<th>职位</th>
			<th>简介</th>
			<th>编辑</th>
			<th>删除</th>
		</tr>
		<c:forEach items="${map.speaker}" var="speaker" varStatus="status">
		  <tr>
			<td width="6%">${status.count}</td>
			<td width="6%">${speaker.speaker_name}</td>
			<td width="6%">${speaker.speaker_job}</td>
			<td>${speaker.speaker_descr}</td>
			<td width="6%">
			<a href="speaker/speaker_update.do?id=${speaker.id}">
			<span class="glyphicon glyphicon-edit"aria-hidden="true"></span>
			</a>
			</td>
			<td width="6%">
			<a href="speaker/speaker_delete.do?id=${speaker.id}">
			<span class="glyphicon glyphicon-trash"aria-hidden="true"></span>
			</a>
			</td>
		</tr>
		</c:forEach>
	</table>
</div>

<div id="div5">
	<nav aria-label="Page navigation">
	<ul class="pagination">
		<li><a href="speaker/speaker_list.do?page=${map.pageInfo.currentPage-1<=0?1:map.pageInfo.currentPage-1}" aria-label="Previous"> 
		<span aria-hidden="true">&laquo;</span>
		</a></li>
		<li><a href="#">${map.pageInfo.currentPage}</a></li>
		<li><a href="speaker/speaker_list.do?page=${map.pageInfo.currentPage+1>=map.pageInfo.totalPage?map.pageInfo.totalPage:map.pageInfo.currentPage+1}" aria-label="Next"> <span aria-hidden="true">&raquo;</span>
		</a></li>
	</ul>
	</nav>
</div>
</body>
</html>